﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Windows.Media.Imaging;

namespace Asteroids.Game.PowerUps
{
    class TriShot : TimedPowerUp
    {
        public TriShot(Coordinate location) : base(location)
        {
            Img = new BitmapImage(new Uri(Path.GetDirectoryName(Application.ExecutablePath) + "/tri_shot.jpg"));

            Type = PowerUpType.TriShot;
            PowerUpProbability = 3;
            PowerUpDuration = 150;
        }

        public override void PerformAction(Player player)
        {
            Console.WriteLine("You got a TriShot");
            player.CurrentShip.CurrentWeapon.CurrentBuffs.Add(WeaponBuff.Trishot);
            Subscribe(player);
        }

        public override object Clone()
        {
            return new TriShot(Location);
        }

        protected override void UndoPerformAction(Player player)
        {
            player.CurrentShip.CurrentWeapon.CurrentBuffs.Remove(WeaponBuff.Trishot);
        }
    }
}
